# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Testing.V1.Model.ResultStorage do
  @moduledoc """
  Locations where the results of running the test are stored.

  ## Attributes

  *   `googleCloudStorage` (*type:* `GoogleApi.Testing.V1.Model.GoogleCloudStorage.t`, *default:* `nil`) - Required.
  *   `resultsUrl` (*type:* `String.t`, *default:* `nil`) - Output only. URL to the results in the Firebase Web Console.
  *   `toolResultsExecution` (*type:* `GoogleApi.Testing.V1.Model.ToolResultsExecution.t`, *default:* `nil`) - Output only. The tool results execution that results are written to.
  *   `toolResultsHistory` (*type:* `GoogleApi.Testing.V1.Model.ToolResultsHistory.t`, *default:* `nil`) - The tool results history that contains the tool results execution that results are written to. If not provided, the service will choose an appropriate value.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :googleCloudStorage => GoogleApi.Testing.V1.Model.GoogleCloudStorage.t() | nil,
          :resultsUrl => String.t() | nil,
          :toolResultsExecution => GoogleApi.Testing.V1.Model.ToolResultsExecution.t() | nil,
          :toolResultsHistory => GoogleApi.Testing.V1.Model.ToolResultsHistory.t() | nil
        }

  field(:googleCloudStorage, as: GoogleApi.Testing.V1.Model.GoogleCloudStorage)
  field(:resultsUrl)
  field(:toolResultsExecution, as: GoogleApi.Testing.V1.Model.ToolResultsExecution)
  field(:toolResultsHistory, as: GoogleApi.Testing.V1.Model.ToolResultsHistory)
end

defimpl Poison.Decoder, for: GoogleApi.Testing.V1.Model.ResultStorage do
  def decode(value, options) do
    GoogleApi.Testing.V1.Model.ResultStorage.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Testing.V1.Model.ResultStorage do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
